from django.db import models

# Create your models here.
class Dict(models.Model):
    name=models.CharField(max_length=20)
    class Meta:
        db_table='dict'
    def __str__(self):
        return self.name
class Position(models.Model):
    sno=models.CharField(max_length=20)
    name=models.CharField(max_length=20)
    order=models.IntegerField(default=0)
    isdel=models.BooleanField(default=False)
    addtime=models.DateTimeField(auto_now_add=True)
    type=models.ForeignKey(Dict,on_delete=models.CASCADE)
    class Meta:
        db_table='position'
    def __str__(self):
        return self.name